package ua.amsoft.brelok.chart;

import org.achartengine.chart.BarChart;
import org.achartengine.renderer.XYMultipleSeriesRenderer;

import ua.amsoft.brelok.dto.ChartRendererParameters;

public class DefaultBarChart implements BrelokBarChart {
    
    private final BrelokBarChartDrawer drawer;
    
    public DefaultBarChart(final XYMultipleSeriesRenderer renderer,
            final ChartRendererParameters rendererParameters) {
        this.drawer = new BrelokBarChartDrawer(renderer, rendererParameters);
    }
    
    @Override
    public BarChart draw() {
        return this.drawer.execute();
    }
    
}
